package com.hp.bon.sgw.wh.mml.common;

import java.util.HashMap;
import java.util.Map;

public class AckEntity {
	
	public static final int TYPE_DEFAULT = 0;
	public static final int TYPE_LOGIN = 1;
	public static final int TYPE_TRANSACTION = 2;
	public static final int TYPE_LOGOUT = 3;
	public static final int TYPE_HEART_BEAT = 4;
	
	public static final String KEY_RETN = "RETN";
	public static final String KEY_DESC = "DESC";
	
	public static final String STATUS_OK = "0";	

	private Map<String, String> ackItems = new HashMap<String, String>();
	
	private Integer ackType = AckEntity.TYPE_DEFAULT;
	
	public void addAckItem(String key, String value){
		if(key==null || value==null || key.isEmpty() || value.isEmpty()){
			return;
		}
		ackItems.put(key, value);
	}	
	public String getAckItemValue(String key){
		if(key==null || key.isEmpty()){
			return null;
		}
		return ackItems.get(key);
	}
	public Map<String, String> getAckItems(){
		return ackItems;
	}
	public Integer getAckType() {
		return ackType;
	}
	public void setAckType(Integer ackType) {
		this.ackType = ackType;
	}
}
